/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Menu.java
 *
 * Created on 26/10/2009, 16:12:34
 */

package sicadiredesg05;

import java.awt.BorderLayout;

/**
 *
 * @author Vista
 */
public class Menu extends javax.swing.JFrame {

    /** Creates new form Menu */
    public Menu() {
        initComponents();
        painelArquivos = new Arquivos();
        painelArquivos.setVisible(false);
        BorderLayout centro = new BorderLayout();
        this.setLayout(centro);
        this.add(painelArquivos, BorderLayout.CENTER);
        painelProcurar = new Procurar();
        painelProcurar.setVisible(false);
        this.add(painelProcurar, BorderLayout.CENTER);
        painelTransferencia = new Transferencia();
        painelTransferencia.setVisible(false);
        this.add(painelTransferencia, BorderLayout.CENTER);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        botaoArquivos = new javax.swing.JMenu();
        botaoExibirArquivos = new javax.swing.JMenuItem();
        botaoProcurar = new javax.swing.JMenu();
        botaoRealizarBusca = new javax.swing.JMenuItem();
        botaoTransferencia = new javax.swing.JMenu();
        botaoExibirTransferências = new javax.swing.JMenuItem();
        botaoAumentarRede = new javax.swing.JMenu();
        botaoProcurarMaisPeers = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SICADI - G05 - v1.0");

        botaoArquivos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sicadiredesg05/Folder_32x32.png"))); // NOI18N
        botaoArquivos.setText("Arquivos");

        botaoExibirArquivos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        botaoExibirArquivos.setText("Exibir Arquivos");
        botaoExibirArquivos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoExibirArquivosActionPerformed(evt);
            }
        });
        botaoArquivos.add(botaoExibirArquivos);

        jMenuBar1.add(botaoArquivos);

        botaoProcurar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sicadiredesg05/Search-32.png"))); // NOI18N
        botaoProcurar.setText("Procurar");

        botaoRealizarBusca.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.CTRL_MASK));
        botaoRealizarBusca.setText("Realizar Busca");
        botaoRealizarBusca.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoRealizarBuscaActionPerformed(evt);
            }
        });
        botaoProcurar.add(botaoRealizarBusca);

        jMenuBar1.add(botaoProcurar);

        botaoTransferencia.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sicadiredesg05/Database-Add-32.png"))); // NOI18N
        botaoTransferencia.setText("Transferência");

        botaoExibirTransferências.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
        botaoExibirTransferências.setText("Exibir Transferências");
        botaoExibirTransferências.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoExibirTransferênciasActionPerformed(evt);
            }
        });
        botaoTransferencia.add(botaoExibirTransferências);

        jMenuBar1.add(botaoTransferencia);

        botaoAumentarRede.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sicadiredesg05/Netvibes2-Logo-Square-Webtreatsetc-32.png"))); // NOI18N
        botaoAumentarRede.setText("Aumentar Rede");

        botaoProcurarMaisPeers.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        botaoProcurarMaisPeers.setText("Procurar mais Peer's");
        botaoProcurarMaisPeers.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoProcurarMaisPeersActionPerformed(evt);
            }
        });
        botaoAumentarRede.add(botaoProcurarMaisPeers);

        jMenuBar1.add(botaoAumentarRede);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1063, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 604, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoExibirArquivosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoExibirArquivosActionPerformed
        painelProcurar.setVisible(false);
        painelTransferencia.setVisible(false);
        this.add(painelArquivos, BorderLayout.CENTER);
        painelArquivos.setVisible(true);
    }//GEN-LAST:event_botaoExibirArquivosActionPerformed

    private void botaoRealizarBuscaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoRealizarBuscaActionPerformed
        painelArquivos.setVisible(false);
        painelTransferencia.setVisible(false);
        this.add(painelProcurar, BorderLayout.CENTER);
        painelProcurar.setVisible(true);
    }//GEN-LAST:event_botaoRealizarBuscaActionPerformed

    private void botaoExibirTransferênciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoExibirTransferênciasActionPerformed
        painelProcurar.setVisible(false);
        painelArquivos.setVisible(false);
        this.add(painelTransferencia, BorderLayout.CENTER);
        painelTransferencia.setVisible(true);
    }//GEN-LAST:event_botaoExibirTransferênciasActionPerformed

    private void botaoProcurarMaisPeersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoProcurarMaisPeersActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_botaoProcurarMaisPeersActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu botaoArquivos;
    private javax.swing.JMenu botaoAumentarRede;
    private javax.swing.JMenuItem botaoExibirArquivos;
    private javax.swing.JMenuItem botaoExibirTransferências;
    private javax.swing.JMenu botaoProcurar;
    private javax.swing.JMenuItem botaoProcurarMaisPeers;
    private javax.swing.JMenuItem botaoRealizarBusca;
    private javax.swing.JMenu botaoTransferencia;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration//GEN-END:variables
    Arquivos painelArquivos;
    Procurar painelProcurar;
    Transferencia painelTransferencia;

}
